/**
* AutoSWF - Cody Cushing. March 26, 2009
* Copyright (c) 2009 Cody Cushing
* No use restrictions. Maintain this notice in all versions. 
**/

package com.autoswf.taskrunner
{
	import com.anywebcam.mock.Mock;
	
	import flash.events.Event;
	
	public class MockTaskRunner extends TaskRunner
	{
		public var mock:Mock = new Mock(this);
		
		public function MockTaskRunner()
		{
			super(null)
		}
		
		override public function result(id:String):*
		{
			return mock.data(id);
		}
		
		override public function addTask(task:IRequest):void
		{
			mock.addLoadTask(task);
		}
		
		override protected function startTask(task:IRequest):void
		{
			mock.startTask(task);
		}
		
		override protected function task_completeHandler(event:Event):void
		{
			mock.loadTask_completeHandler(event);
		}
		
		override protected function task_errorHandler(event:TaskEvent):void
		{
			mock.loadTask_errorHandler(event);
		}
 

	}
}